Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create sysadmin account from user-provided values #144

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

wardi
Copy link
Contributor

@wardi wardi commented Apr 29, 2024

Have users enter sysadmin name/password/email values in the .env file

@EricSoroos
Copy link

What about PR #76?

@wardi wardi marked this pull request as draft May 21, 2024 13:20
@wardi wardi marked this pull request as ready for review May 21, 2024 19:43
@wardi
Copy link
Contributor Author

wardi commented May 21, 2024

@kowh-ai I've removed the feature instead and updated the README with instructions for creating a sysadmin account.

@kowh-ai
Copy link
Contributor

kowh-ai commented May 29, 2024

@wardi - I’m having problems getting this PR to work on a fresh ckan-docker 2.10.4 environment

When docker compose builds the CKAN service container it runs the (CMD) start_ckan.sh script (which calls prerun.py which does not create the ckan_admin user as all 3 environment variables (CKAN_SYSADMIN_NAME, CKAN_SYSADMIN_PASSWORD and CKAN_SYSADMIN_EMAIL) are not set. When execution returns to start_ckan.sh the /docker-entrypoint.d/01_setup_datapusher.sh is called next which tries to set the ckan.datapusher.api_token using the ckan_admin user (who does not exist, so fails). This causes the CKAN container to fail as the ckan.datapusher.api_token is not set

I’m scratching my head as to how you got this PR to work?

I guess we will need to come up with a way of setting a value for ckan.datapusher.api_token in the CKAN config file without having to resort to using a hard-coded admin username

@wardi
Copy link
Contributor Author

wardi commented Jul 10, 2024

@kowh-ai I'm generally not using datapusher, and when I do I've been copying a token into the .env manually.

datapusher could use a token generated against the site user instead of admin user, right? That might let us automatically generate the token without requiring a known sysadmin account name.

@kowh-ai
Copy link
Contributor

kowh-ai commented Jul 19, 2024

@wardi - ah yes OK. This whole "needing a token before services are ready" has been one of the main issues affecting users in the last year or so. We need some sort of "seed" value that can be used as a token just to get the services to start but will need to change to a proper token (somehow) at some later stage...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants